package com.neusoft.a312cxy.android18cxy.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;

import com.neusoft.a312cxy.android18cxy.R;

/**
 * Created by Young on 2017/11/13.
 */

public class YiwanchengdingdanActivity extends AppCompatActivity {

    private String id,type,update_time,price,name;
    private TextView id1,type1,price1,name1;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_yiwanchengdingdan);

        intview();
        saveDate();
        // getuserinfo;
    }

    public void saveDate(){
        Intent intent = getIntent();
        Bundle bundle=intent.getExtras();

        id1.setText(intent.getStringExtra("orderid"));
        //    sex.setText(intent.getStringExtra("sex"));
        price1.setText(intent.getStringExtra("price"));
        name1.setText(intent.getStringExtra("name"));
        type=bundle.getString("type");
        //订单类型
        if(type.equals("1")){
            type1.setText("活动订单");
        }
        else if(type.equals("2")){
            type1.setText("培训订单");
        }
        else if (type.equals("3")){
            type1.setText("课程订单");
        }

    }

    public void intview(){
        id1=(TextView) findViewById(R.id.id1);
        price1=(TextView) findViewById(R.id.price1);
        name1=(TextView) findViewById(R.id.name1);
        type1=(TextView) findViewById(R.id.type1);

    }
}
